﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Admin.aspx.cs" Inherits="Lab8_Security.Admin" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<div><span id="Message" runat="server"></span></div>
<%
    if (Session["UserLogin"] != null)
    {
        EC2011_hk1_BT8_1041074_1041130_1042119.User us = (EC2011_hk1_BT8_1041074_1041130_1042119.User)Session["UserLogin"];
        if (us.IdRole == 1)
        {
%>
        <h2>Danh sách thành viên</h2>
    <table style="width:50%;">
        <tr>
            <td>
                STT</td>
            <td>
                User name</td>
            <td>
                Email</td>
        </tr>

<%  
        }      
    }     
%>
        <%
            for (int i = 0; i < listUser.Count; i++)
            {
                EC2011_hk1_BT8_1041074_1041130_1042119.User us = listUser[i];
        %>
                <tr>
                    <td>
                        <%=(i+1).ToString() %></td>
                    <td>
                        <%=us.Username %></td>
                    <td>
                        <%=us.Email %></td>
                    
                </tr>
        <%        
            }    
        %>
        
        
    </table>
    
</asp:Content>
